﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;

namespace SimpleLiteForm.References
{
    /// <summary>
    /// Defines the interface to a reference source.
    /// </summary>
    interface IReferenceService
    {
        /// <summary>
        /// Searches for a term in a specific language.
        /// </summary>
        /// <param name="term">The search term.</param>
        /// <param name="language">The language.</param>
        void Search(string term, CultureInfo language);

        /// <summary>
        /// Gets wheter there is a search result. This may take a while
        /// because the serach is done asynchronously.
        /// </summary>
        bool HasResult { get; }

        /// <summary>
        /// Gets wheter the async search is still going on.
        /// </summary>
        bool IsLoading { get; }

        /// <summary>
        /// Gets the search results.
        /// </summary>
        IList<ReferenceResult> Results { get; }
    }
}
